package com.wanda.util;

import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.annotation.Resource;

import com.wanda.model.CustomerModel;
import com.wanda.model.MenuModel;
import com.wanda.service.CustomerService;
import com.wanda.service.MenuService;
import com.wanda.service.impl.MenuServiceImpl;

public class DateFormat {

	/**
	 * 获取现在时间
	 * 
	 * @return 返回时间类型 yyyy-MM-dd HH:mm:ss
	 * @throws ParseException 
	 */
	public static String getNowDate()  {	
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
		System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
		String date =df.format(new Date());
		return date;
		
	}

	public static void main(String[] args) {		
//		MenuService menu = new MenuServiceImpl();
//		MenuModel model = new MenuModel();
//		
//		model.setId("321456");
//		model.setMenu_name("987654");
//		model.setMenu_url("asfasfdsafd");
//		model.setPid("asfaf");
//		model.setDelete_state("fd");
//		model.setDelete_time(getNowDate());
//		model.setUdpate_time(getNowDate());
//		model.setDelete_user("asf");
//		model.setUpdate_user("987");
//		menu.addMenu(model);
		
	}

}
